/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Jtable.java
 *
 * Created on May 17, 2011, 1:53:09 AM
 */


/**
 *
 * @author thato
 */
package Lab_v3;

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class ResultsTable extends javax.swing.JFrame {

    private Object[][] resultsArray;

    /** Creates new form Jtable */
    public ResultsTable() {
        //initComponents();
    }

    /** This method is called from within the constructor to
     initialize the table.**/

    public void initComponents(Object[][] table) {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
	setFont(new java.awt.Font("Ubuntu", 1, 36));
	setTitle("Test Results");
        jTable1.setModel(new javax.swing.table.DefaultTableModel(
          table ,
            new String [] {
                "Question Number", "Your Answer", "Correct Answer", "Score"
            }
        )
	{
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(13, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(13, Short.MAX_VALUE))
        );

        pack();
    }



    // Variables declaration
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    // End of variables declaration

}

